Hello Forums,
I want to link two modules so that if I change the source module changes the target module too and the opposit also if I change the target module changes the source module.
the commen attribute between the two modules ist the Identifer no.
Best regards, Neven
Control17 - Wed Jan 17 08:55:47 EST 2018 |
Re: links between modules Possible, yes, somehow, but not recommended...
It is quite uncommon that you have attributes that will be modified in both modules - it is good design practice to define the ownership of data in a single place, so the Identifier no will only be modified in module A and changes of the identifier will be reflected in module B. If you have such a data model, then in module B you only need a DXL layout column that you can define using the analysis wizard that shows the identifier of module A (or a similar DXL attribute). If the user works in module B, he can simply follow the link to the corresponding object in module A and edit the ID there.
If you really need this information to be changeable in module B, you cannot use DXL layout. Instead, you would need a synchronizing mechanism that is either a script, started by the user in a pull down menu or by a cron job or a trigger. The trigger solution would be quite a bad idea, because as soon as the user that modifes the identifier no. in module A, the trigger needs to open module B in exclusive mode, locate the corresponding object in A and modify the identifier there. So, it would almost not be possible for two different users to work in module A and module B at the same time. What will you do, if the trigger cannot open module A, because it is already opened? Will you wait, until the other user finishes his work and in the meantime block the user editing module B from his work? The pull down menu or cron variant would have to open modules A and B in exclusive mode, and for every single object it needs to determine the time when Identifier no. was modified for the last time and this last change would then be done in tthe other module. |
Re: links between modules Mike.Scharnow - Wed Jan 17 13:59:39 EST 2018 Possible, yes, somehow, but not recommended...
It is quite uncommon that you have attributes that will be modified in both modules - it is good design practice to define the ownership of data in a single place, so the Identifier no will only be modified in module A and changes of the identifier will be reflected in module B. If you have such a data model, then in module B you only need a DXL layout column that you can define using the analysis wizard that shows the identifier of module A (or a similar DXL attribute). If the user works in module B, he can simply follow the link to the corresponding object in module A and edit the ID there.
If you really need this information to be changeable in module B, you cannot use DXL layout. Instead, you would need a synchronizing mechanism that is either a script, started by the user in a pull down menu or by a cron job or a trigger. The trigger solution would be quite a bad idea, because as soon as the user that modifes the identifier no. in module A, the trigger needs to open module B in exclusive mode, locate the corresponding object in A and modify the identifier there. So, it would almost not be possible for two different users to work in module A and module B at the same time. What will you do, if the trigger cannot open module A, because it is already opened? Will you wait, until the other user finishes his work and in the meantime block the user editing module B from his work? The pull down menu or cron variant would have to open modules A and B in exclusive mode, and for every single object it needs to determine the time when Identifier no. was modified for the last time and this last change would then be done in tthe other module. Hello, thanks for your reply and explation , i have found 4 scripts in Smart dxl : 1. Pull Attributes down 2. Pull Attributes up 3. Push Attributes down 4. Push Attributes up should I take Push up (copy the changes from source module (outlink) into target moduel (inlink) ) and Pull up ( copy the changes from target module (inlink) into source module (outlink)) ? is that right ?
Best regards, Neven
|
Re: links between modules Control17 - Thu Jan 18 04:37:13 EST 2018 Hello, thanks for your reply and explation , i have found 4 scripts in Smart dxl : 1. Pull Attributes down 2. Pull Attributes up 3. Push Attributes down 4. Push Attributes up should I take Push up (copy the changes from source module (outlink) into target moduel (inlink) ) and Pull up ( copy the changes from target module (inlink) into source module (outlink)) ? is that right ?
Best regards, Neven
Hi Neven,
I don't think that this will help you. The requirement as you stated is that you want to be able to change the identifer in both modules and expect the result to be synchronized.
Example: Module A Ident 01 Ident 02 Ident 03
Module B Ident 01 Ident 02 Ident 03
Assume Module A contains the source of all links and Module contains the destination of all links
Now your users work in both modules. When they save the module, thely look like this
Module A Ident 01 Ident 02-A Ident 03
Module B Ident 01 Ident 02 Ident 03-A
You can now choose any of the four scripts - all of them will overwrite one of the changes. Example Open Module A, use "Pull Down" will result in
Module A Ident 01 Ident 02 Ident 03-A
(the change from Ident 02 to Ident 02-A is overwritten).
The only way I can think of to deal with this is to find the latest change of the Identifier of object 2 and determine which change was done later.. In this case, during a Pull down, the script would detect that the value "Ident 02-A" is "newer" than the value "Ident 02" and the current value shall not be overwritten. To detect the date of a change, you will have to traverse the history entries of the corresponding objects, special care has to be taken if baselines have been created, there are posts about this somewhere on the forum.
I still think that you should rework your data ownership definitions - the scripts from Tony all assume that you have a clear data ownership .... much less problems involved
Regards, |
Re: links between modules (
If module A is modified, update module B ... Do you really need 2 modules ? Can't you just merge them?? ) |
Re: links between modules pommCannelle - Thu Jan 18 10:57:06 EST 2018 (
If module A is modified, update module B ... Do you really need 2 modules ? Can't you just merge them?? ) Hello , yes, I need two modules because each module belongs to a department and each department can change and then with the other department make update for the changes. Best Regards, Neven |
Re: links between modules Control17 - Fri Jan 19 08:17:39 EST 2018 Hello , yes, I need two modules because each module belongs to a department and each department can change and then with the other department make update for the changes. Best Regards, Neven well, you could still use one module and every department has its own attributes and corresponding views. You can use access rights to ensure that nobody changes the wrong attributes.
if you need two modules, you still need a mechanism on how to detect which department has the correct number stored. This problem is not even DOORS related, it's a data model problem. Such a situation should not occur.
The objects are already linked. So why do you need to edit this number in both modules? the employees could still agree that they only change this ident number in one attribute only. again: using access rights, this could be achieved.
If you really have no alternative solution and have no influence on the data model and the departments will not listen to your ideas, you might use the approach that the person who stored the number for the last time has stored the correct number which I mentioned earlier. As I said, this is not so easy to implement, but there are posts in the forum on how to find out when an attribute was changed for the last time.
One other possibility would be to use a branch/merge tool like the BranchManager for DOORS (sorry for the advertisement). |